<?php

/**
 * Created by Green Studio.
 * File: CommonWidget.class.php
 * User: TianShuo
 * Date: 14-1-24
 * Time: 下午2:52
 */

namespace Common\Widget;

/**
 * 侧边栏能过小挂件
 * Class CommonHeaderWidget
 * @package Home\Widget
 */
class SearchWidget extends SideBarWidget {

    /**
     * 小挂件的名字
     * @var type 
     */
    protected $name = '';

    /**
     * 小挂件的
     * @var type 
     */
    protected $desc = '';

    /**
     * 小工具选项
     * @var type 
     */
    protected $widget_options = array('title');

    /**
     * 渲染小工具
     * @param type $data
     */
    public function render($data) {
        $this->assign('title', $data['title']);
        $this->display('widget:search');
    }

    public function __construct() {
        $this->name = '搜索';
        $this->desc = '您站点的搜索框。';
        $this->id = 'widget_search';
        parent::__construct();
    }
    /**
     * 保存
     */
    public function save(){
        
    }
    /**
     * 设置小工具
     */
    public function setting() {
//        return include './calendar.html';
        return file_get_contents(__DIR__ . '/search.html');
    }

}
